/* eslint-disable no-undef */
import nprogress from "nprogress"


// 消息提示
// type="success"，将type参数默认值设为success
export const toast = (message, type = "success", dangerouslyUserHTMLString = false) => {
    ElNotification({
        message,
        type,
        duration: 3000,
        dangerouslyUserHTMLString
    })
}

// 消息确认框方法
export const showModal = (content="提示内容",type="warning",title="") => {
    return ElMessageBox.confirm(
      content,
      title,
      {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: type,
      }
    )
}

// 显示全屏loading
export const showFullLoading = () =>{
  nprogress.start();
}

// 隐藏全屏loading
export const hideFullLoading = () =>{
  nprogress.done();
}